import request from '@/utils/request'

// 获取菜单列表
export const getMenuList = (params: any) => {
  return request('/api/menus', 'get', params)
}
//新增菜单
export const addMenu = (data: any) => {
  return request(`/api/menus`, 'post', data)
}
// 保存菜单
export const editMenu = (id: string, data: any) => {
  return request(`/api/menus/${id}`, 'put', data)
}

// 删除菜单
export const deleteMenu = (id: string) => {
  return request(`/api/menus/${id}`, 'delete')
} 